//
//  YJWVerticalBtn.m
//  百思不得骑姐
//
//  Created by YJW on 16/10/30.
//  Copyright © 2016年 yijiang. All rights reserved.
//

#import "YJWVerticalBtn.h"

@implementation YJWVerticalBtn

-(void)awakeFromNib
{
    [super awakeFromNib];
    self.titleLabel.textAlignment = NSTextAlignmentCenter;
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    //设置按钮图片
    self.imageView.x = 0;
    self.imageView.y = 0;
    self.imageView.width = self.width;
    self.imageView.height = self.imageView.width;
    
    //设置按钮文字
    self.titleLabel.x = 0;
    self.titleLabel.y = self.imageView.height;
    self.titleLabel.width = self.width;
    self.titleLabel.height = self.height - self.titleLabel.y;
}

@end
